package com.powernode.controller;

import com.powernode.commons.Result;
import com.powernode.commons.ResultException;
import com.powernode.pojo.Goods;
import com.powernode.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/goods")
public class GoodsController {

    @Autowired
    private GoodsService goodsService;

    @RequestMapping("/items")
    public Result items(){
        List<Goods> data = goodsService.findByList();
        return  Result.OK(data);
    }

}
